package cn.wolfcode.trip.app.controller;

import cn.wolfcode.trip.base.domain.StrategyDetail;
import cn.wolfcode.trip.base.query.QueryObject;
import cn.wolfcode.trip.base.query.StrategyCatalogQueryObject;
import cn.wolfcode.trip.base.query.StrategyQueryObject;
import cn.wolfcode.trip.base.service.IStrategyCatalogService;
import cn.wolfcode.trip.base.service.IStrategyDetailService;
import cn.wolfcode.trip.base.service.IStrategyService;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 大攻略资源控制器
 */
@RestController
@RequestMapping("details")
public class StrategyDetailController {
    @Autowired
    private IStrategyDetailService strategyDetailService;

    /**
     * 获取某一篇攻略文章
     * @param id
     * @return
     */
    @GetMapping("/{id}")
    public StrategyDetail query(@PathVariable Long id){
        StrategyDetail detail = strategyDetailService.getDetailById(id);
        return detail;
    }
}
